#ifndef PLATFORM_H
#define PLATFORM_H

#include <QObject>
#include <QSqlDataBase>
#include <QtQml/QtQml>
#include <QQmlEngine>


class Platform:public QObject
{

    Q_OBJECT

//    Q_PROPERTY(QString qsFilePath READ qsFilePath WRITE setQsFilePath NOTIFY qsFilePathChanged)
//    Q_PROPERTY(QString psaspDbPath READ psaspDbPath WRITE setPsaspDbPath NOTIFY databaseChanged)
//    Q_PROPERTY(int psaspCaseNo READ psaspCaseNo WRITE setPsaspCaseNo NOTIFY psaspCaseNoChanged)
//    Q_PROPERTY(QString saveMapFilePath READ saveMapFilePath WRITE setSaveMapFilePath NOTIFY saveMapFilePathChanged)
//    Q_PROPERTY(QString importMapFilePath READ importMapFilePath WRITE setImportMapFilePath NOTIFY importMapFilePathChanged)
    Q_PROPERTY(bool isChooseFirstPath READ isChooseFirstPath WRITE setIsChooseFirstPath NOTIFY isChooseFirstPathChanged)

public:

    Platform(QObject* parent=nullptr);
    ~Platform();

    static Platform* getInstance();
    static Platform* qmlAttachedProperties(QObject*);


    bool isChooseFirstPath() const;
    void setIsChooseFirstPath(bool isChoose);


Q_SIGNALS:

    void isChooseFirstPathChanged();

    void showDialog(QString title,QString content);

protected:
    bool m_bIsChooseFirstPath=true;
private:
    static Platform* _Instance;


};

QML_DECLARE_TYPEINFO(Platform,QML_HAS_ATTACHED_PROPERTIES)
#endif // PLATFORM_H
